package com.ruoyi.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ProApplicationPaymentMapper;
import com.ruoyi.domain.ProApplicationPayment;
import com.ruoyi.service.IProApplicationPaymentService;
import com.ruoyi.common.core.text.Convert;

/**
 * 付款申请单Service业务层处理
 *
 * @author ruoyi
 * @date 2020-06-23
 */
@Service
public class ProApplicationPaymentServiceImpl implements IProApplicationPaymentService {
    @Autowired
    private ProApplicationPaymentMapper proApplicationPaymentMapper;

    /**
     * 查询付款申请单
     *
     * @param aId 付款申请单ID
     * @return 付款申请单
     */
    @Override
    public ProApplicationPayment selectProApplicationPaymentById(Long aId) {
        return proApplicationPaymentMapper.selectProApplicationPaymentById(aId);
    }

    @Override
    public ProApplicationPayment selectProApplicationPaymentByIds(int aStatus) {
        return proApplicationPaymentMapper.selectProApplicationPaymentByIds(aStatus);
    }

    /**
     * 查询付款申请单列表
     *
     * @param proApplicationPayment 付款申请单
     * @return 付款申请单
     */
    @Override
    public List<ProApplicationPayment> selectProApplicationPaymentList(ProApplicationPayment proApplicationPayment) {
        return proApplicationPaymentMapper.selectProApplicationPaymentList(proApplicationPayment);
    }

    /**
     * 新增付款申请单
     *
     * @param proApplicationPayment 付款申请单
     * @return 结果
     */
    @Override
    public int insertProApplicationPayment(ProApplicationPayment proApplicationPayment) {
        proApplicationPayment.setaCreateTime(new Date());
        return proApplicationPaymentMapper.insertProApplicationPayment(proApplicationPayment);
    }

    /**
     * 修改付款申请单
     *
     * @param proApplicationPayment 付款申请单
     * @return 结果
     */
    @Override
    public int updateProApplicationPayment(ProApplicationPayment proApplicationPayment) {
        return proApplicationPaymentMapper.updateProApplicationPayment(proApplicationPayment);
    }

    /**
     * 删除付款申请单对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteProApplicationPaymentByIds(String ids) {
        return proApplicationPaymentMapper.deleteProApplicationPaymentByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除付款申请单信息
     *
     * @param aId 付款申请单ID
     * @return 结果
     */
    @Override
    public int deleteProApplicationPaymentById(Long aId) {
        return proApplicationPaymentMapper.deleteProApplicationPaymentById(aId);
    }

    @Override
    public List<ProApplicationPayment> selectProjectContractlists(Long sId) {
        return proApplicationPaymentMapper.selectProjectContractlists(sId);
    }

    @Override
    public List<ProApplicationPayment> selectProjectContractlistsid(Long sId, Long id) {
        return proApplicationPaymentMapper.selectProjectContractlistsid(sId,id);
    }

    /**
     * 导出
     *
     * @param proApplicationPayment 付款申请单信息
     * @return 付款申请单信息集合信息
     */
    @Override
    public List<ProApplicationPayment> selectUserexport(ProApplicationPayment proApplicationPayment) {
        return proApplicationPaymentMapper.selectUserexport(proApplicationPayment);
    }

    @Override
    public int finExaStatus(Long aId) {
        return proApplicationPaymentMapper.finExaStatus(aId);
    }

    @Override
    public int finExaStatuss(Long aId) {
        return proApplicationPaymentMapper.finExaStatuss(aId);
    }

    @Override
    public int editparoStatus(Long aId) {
        return proApplicationPaymentMapper.editparoStatus(aId);
    }

    @Override
    public int revoExaStatus(Long aId) {
        return proApplicationPaymentMapper.revoExaStatus(aId);
    }

    @Override
    public int fExaStatus(Long aId) {
        return proApplicationPaymentMapper.fExaStatus(aId);
    }

    @Override
    public int over(Long aId) {
        return proApplicationPaymentMapper.over(aId);
    }

}
